{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# **Hypersensitive OCP**\n",
    "(c) 2023 Devakumar Thammisetty\n",
    "\n",
    "MPOPT is an open-source Multi-phase Optimal Control Problem (OCP) solver based on pseudo-spectral collocation with customized adaptive grid refinement techniques.\n",
    "\n",
    "https://mpopt.readthedocs.io/\n",
    "\n",
    "Download this notebook: [hypersensitive.ipynb](https://github.com/mpopt/mpopt/blob/docs/docs/source/notebooks/hypersensitive.ipynb)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Install mpopt from pypi using the following. Disable after first usage"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Import mpopt (Contains main solver modules)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "#!pip install mpopt\n",
    "from mpopt import mp"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Defining OCP\n",
    "\n",
    "Hypersensitive OCP:\n",
    "https://www.gpops2.com/Examples/HyperSensitive.html\n",
    "\n",
    "   \\begin{aligned}\n",
    "&\\min_{x, u}        & \\qquad & J = 0 + \\dfrac{1}{2}\\int_{t_0}^{t_f} (x^2 + u^2) \\ dt\\\\\n",
    "&\\text{subject to} &      & \\dot{x} = -x^3 + u\\\\\n",
    "&                  &      & x_0(t_0) = 1; t_0 = 0;\\\\\n",
    "&                  &      & x_1(t_f) = 0; t_f = 1000\n",
    "  \\end{aligned}\n",
    "\n",
    "\n",
    "We first create an OCP object and then polulate the object with dynamics, path_constraints, terminal_constraints and objective (running_costs, terminal_costs)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "ocp = mp.OCP(n_states=1, n_controls=1, n_phases=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "ocp.dynamics[0] = lambda x, u, t: [-x[0] * x[0] * x[0] + u[0]]\n",
    "ocp.running_costs[0] = lambda x, u, t: 0.5 * (x[0] * x[0] + u[0] * u[0])\n",
    "ocp.terminal_constraints[0] = lambda xf, tf, x0, t0: [xf[0] - 1.0]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Initial state"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "ocp.x00[0] = 1"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Box constraints"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "ocp.lbtf[0] = ocp.ubtf[0] = 1000.0"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Scale the time variable"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "ocp.scale_t = 1 / 1000.0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "ocp.validate()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Solve and plot the results in one line\n",
    "\n",
    "Lets solve the OCP using following pseudo-spectral approximation\n",
    "* Collocation using Legendre-Gauss-Radau roots\n",
    "* Let's plot the position and velocity evolution with time starting from 0.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "******************************************************************************\n",
      "This program contains Ipopt, a library for large-scale nonlinear optimization.\n",
      " Ipopt is released as open source code under the Eclipse Public License (EPL).\n",
      "         For more information visit http://projects.coin-or.org/Ipopt\n",
      "******************************************************************************\n",
      "\n",
      "Total number of variables............................:      501\n",
      "                     variables with only lower bounds:        0\n",
      "                variables with lower and upper bounds:        0\n",
      "                     variables with only upper bounds:        0\n",
      "Total number of equality constraints.................:      252\n",
      "Total number of inequality constraints...............:        0\n",
      "        inequality constraints with only lower bounds:        0\n",
      "   inequality constraints with lower and upper bounds:        0\n",
      "        inequality constraints with only upper bounds:        0\n",
      "\n",
      "\n",
      "Number of Iterations....: 12\n",
      "\n",
      "                                   (scaled)                 (unscaled)\n",
      "Objective...............:   1.1498050755273090e+00    1.1498050755273090e+00\n",
      "Dual infeasibility......:   4.7184478546569153e-16    4.7184478546569153e-16\n",
      "Constraint violation....:   1.4589005542615039e-14    1.1368683772161603e-13\n",
      "Complementarity.........:   0.0000000000000000e+00    0.0000000000000000e+00\n",
      "Overall NLP error.......:   1.4589005542615039e-14    1.1368683772161603e-13\n",
      "\n",
      "\n",
      "Number of objective function evaluations             = 30\n",
      "Number of objective gradient evaluations             = 13\n",
      "Number of equality constraint evaluations            = 42\n",
      "Number of inequality constraint evaluations          = 0\n",
      "Number of equality constraint Jacobian evaluations   = 13\n",
      "Number of inequality constraint Jacobian evaluations = 0\n",
      "Number of Lagrangian Hessian evaluations             = 12\n",
      "Total CPU secs in IPOPT (w/o function evaluations)   =      0.066\n",
      "Total CPU secs in NLP function evaluations           =      0.010\n",
      "\n",
      "EXIT: Optimal Solution Found.\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 340.00us ( 11.33us) 340.41us ( 11.35us)        30\n",
      "       nlp_g  |   4.85ms (115.38us)   4.78ms (113.76us)        42\n",
      "    nlp_grad  | 266.00us (266.00us) 265.36us (265.36us)         1\n",
      "  nlp_grad_f  | 322.00us ( 23.00us) 322.67us ( 23.05us)        14\n",
      "  nlp_hess_l  | 592.00us ( 49.33us) 595.87us ( 49.66us)        12\n",
      "   nlp_jac_g  |   2.76ms (197.43us)   2.75ms (196.68us)        14\n",
      "       total  |  76.82ms ( 76.82ms)  76.14ms ( 76.14ms)         1\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEGCAYAAABo25JHAAAABHNCSVQICAgIfAhkiAA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FhDHG5Ll8OTVkjDGmC5YIjDEmz1kiMMaYPGeJwBhj8pwlAmOMyXOWCEzeE5FRIvKi9/e2iGz3hutF5NZc18+YoNnlo8akEJFFQL2qXp/ruhjTV+yIwJguiMi8lOcdLBKRpSKyUkS2ichHROSnIrJeRB7xuvpARGaJyBMiskZEHk12FdDNNk5PORp5QUSG9kVsxqSyRGBM5ibj9m10HvAHYIWqngg0Aud6yeAW4EJVnQXcAfzwMGV+HbhCVacDc72yjOlTscMvYozxPKyqrSKyHvdBKY9409fj9il/LDAV+IfbPQ5R3O4DuvM0cIOILAPuV9WaICpuTHcsERiTuWYAVXVEpFUPNbA5uN8lAV5W1fdmWqCq/lhEHsTtI+ppEXmfqr7id8WN6Y6dGjLGP68C5SLyXnC7CBeRE7zhK0XkyvQVRGSyqq5X1Z/g9pJ7XJ/W2BgsERjjG1Vtwe0C+Sci8hJub7CneLOPo/P+8b8i7sPZ1+H2QPlwn1TWmBR2+agxfcC7+ugjXrIwpl+xRGCMMXnOTg0ZY0yes0RgjDF5zhKBMcbkOUsExhiT5ywRGGNMnrNEYIwxee7/Ax+8DTldmPwfAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "mpo, post = mp.solve(ocp, n_segments=5, poly_orders=50, scheme=\"LGR\", plot=True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "*Retrive the solution*\n",
    "\n",
    "x: states, u: Controls, t:time, a:Algebraic variables"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Terminal time, state : 1000.0000 vs 1000 (Exact), [1.]\n"
     ]
    }
   ],
   "source": [
    "x, u, t, a = post.get_data()\n",
    "print(f\"Terminal time, state : {t[-1][0]:.4f} vs 1000 (Exact), {x[-1]}\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Solve again with Chebyshev-Gauss-Lobatto (CGL) roots"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Total number of variables............................:      501\n",
      "                     variables with only lower bounds:        0\n",
      "                variables with lower and upper bounds:        0\n",
      "                     variables with only upper bounds:        0\n",
      "Total number of equality constraints.................:      252\n",
      "Total number of inequality constraints...............:        0\n",
      "        inequality constraints with only lower bounds:        0\n",
      "   inequality constraints with lower and upper bounds:        0\n",
      "        inequality constraints with only upper bounds:        0\n",
      "\n",
      "\n",
      "Number of Iterations....: 12\n",
      "\n",
      "                                   (scaled)                 (unscaled)\n",
      "Objective...............:   1.1406025536022588e+00    1.1406025536022588e+00\n",
      "Dual infeasibility......:   5.5128124287762148e-13    5.5128124287762148e-13\n",
      "Constraint violation....:   5.6878507039202523e-12    1.8587797967484221e-11\n",
      "Complementarity.........:   0.0000000000000000e+00    0.0000000000000000e+00\n",
      "Overall NLP error.......:   5.6878507039202523e-12    1.8587797967484221e-11\n",
      "\n",
      "\n",
      "Number of objective function evaluations             = 36\n",
      "Number of objective gradient evaluations             = 13\n",
      "Number of equality constraint evaluations            = 49\n",
      "Number of inequality constraint evaluations          = 0\n",
      "Number of equality constraint Jacobian evaluations   = 13\n",
      "Number of inequality constraint Jacobian evaluations = 0\n",
      "Number of Lagrangian Hessian evaluations             = 12\n",
      "Total CPU secs in IPOPT (w/o function evaluations)   =      0.061\n",
      "Total CPU secs in NLP function evaluations           =      0.010\n",
      "\n",
      "EXIT: Optimal Solution Found.\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 425.00us ( 11.81us) 407.26us ( 11.31us)        36\n",
      "       nlp_g  |   5.59ms (114.14us)   5.58ms (113.88us)        49\n",
      "    nlp_grad  | 264.00us (264.00us) 263.05us (263.05us)         1\n",
      "  nlp_grad_f  | 325.00us ( 23.21us) 325.10us ( 23.22us)        14\n",
      "  nlp_hess_l  | 614.00us ( 51.17us) 617.11us ( 51.43us)        12\n",
      "   nlp_jac_g  |   2.82ms (201.79us)   2.81ms (201.06us)        14\n",
      "       total  |  78.41ms ( 78.41ms)  77.65ms ( 77.65ms)         1\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEGCAYAAABo25JHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAgAElEQVR4nO3deZwU9Z3/8denewaQUy5BBB08wHggIBKPYBDX1cREY9RNjFHQ7I9ssmJONyZuops1bjTGjTHZJGwONIv3kRDjlaijaIyISFBQCQo4o4KACgwwzHT35/dH1QzNMEfPTNX09NT7+XhAd13f+n66ZvozVd/6fsvcHRERSa5UsSsgIiLFpUQgIpJwSgQiIgmnRCAiknBKBCIiCVdW7Aq017Bhw7yioqJD227bto1+/fpFW6FuTjEng2JOhs7E/Pzzz2909+HNLSu5RFBRUcHixYs7tG1lZSXTp0+PtkLdnGJOBsWcDJ2J2czWtrQstktDZvZrM3vHzF5qYbmZ2Y/NbJWZLTOzyXHVRUREWhZnG8E84LRWln8EOCT8Nxv4WYx1gapF7L/2bqhaFOtuRERiEeN3WGyJwN2fBN5tZZUzgVs88FdgbzPbN5bKVC0i85uPsf/r8/Gbz1AyEJGSsnnlU9T+6nQqVs+HGL7DitlGsB9QlTddHc57u+mKZjab4KyBESNGUFlZ2a4d7b/2bg7I1ZO2HLnMTlY/dgtvHLC9wxUvJTU1Ne3+vEqJmdGvXz/S6XTjvIEDB/LCCy8UsVZdr2nM2WyWbdu20ZOHkOnpP9v5hr92F+M9Qyr8DlsT8XdYSTQWu/tcYC7AlClTvN2NJVV9yfzmTjLZetLlvThwxoUcOG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H1RhzuHwQUGqPqKsGqt392XD6boLE0JOP8z8Aq919g7vXA/cSHPuefJwbtPe4dvp4JyURPAccEt5x0Iug0WlBkevUaWZmwK+Al939hrxFC4CGOwdmErQdNMy/MLz74Fhgc94paElw92+6+2h3ryA4jo+5+/kEj0k9J1ytacwNn8U54fol9Zezu68DqsxsfDjrZGAFPfg4E1wSOtbM+oY/5w0x99jjnKe9x/Vh4B/NbHB4JvWP4bzCFbuhpAsbZD4KrAReA64odn0iiulDBKeNy4Cl4b+PElwbfRT4O/BnYEi4vhHcPfUa8CLBHRlFj6MT8U8H7g/fHwgsAlYBdwG9w/l9wulV4fIDi13vDsY6EVgcHuvfAYN7+nEG/gN4BXgJ+C3Qu6cdZ+A2gjaQeoIzv8915LgCF4exrwIuam89NMSEiEjCJeXSkIiItECJQEQk4ZQIREQSTolARCThlAhERBJOiUASz8yGmtnS8N86M3szfF9jZv9T7PqJxE23j4rkMbOrgBp3v77YdRHpKjojEGmBmU3Pe97BVWZ2s5ktNLO1ZvZJM7vOzF40s4fCoT4ws6PN7Akze97MHm4YKqCVfXw472zkBTMb0BWxieRTIhAp3EEEYxudAfwf8Li7HwnsAE4Pk8FNwDnufjTwa+B7bZT5deBf3X0iMC0sS6RLlbW9ioiEHnT3ejN7keBBKQ+F818kGFN+PHAE8KdgeBzSBMMHtOZp4AYzmw/c6+7VcVRcpDVKBCKF2wng7jkzq/ddDWw5gt8lA5a7+3GFFuju3zezPxKMEfW0mZ3q7q9EXXGR1ujSkEh0XgWGm9lxEAwRbmaHh+8vMbNLmm5gZge5+4vufi3BKLmHdmmNRVAiEImMu9cRDIF8rZn9jWA02OPDxYfS/Pj4X7bg4ezLCEagfLBLKiuSR7ePinSB8O6jT4bJQqRbUSIQEUk4XRoSEUk4JQIRkYRTIhARSTglAhGRhFMiEBFJOCUCEZGE+/9LSNT6k3tjvQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "mpo, post = mp.solve(ocp, n_segments=5, poly_orders=50, scheme=\"CGL\", plot=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Terminal time, state : 1000.0000 vs 1000s (Exact), [1.]\n"
     ]
    }
   ],
   "source": [
    "x, u, t, a = post.get_data()\n",
    "print(f\"Terminal time, state : {t[-1][0]:.4f} vs 1000s (Exact), {x[-1]}\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Solve again with Legendre-Gauss-Lobatto (LGL) roots"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Total number of variables............................:      501\n",
      "                     variables with only lower bounds:        0\n",
      "                variables with lower and upper bounds:        0\n",
      "                     variables with only upper bounds:        0\n",
      "Total number of equality constraints.................:      252\n",
      "Total number of inequality constraints...............:        0\n",
      "        inequality constraints with only lower bounds:        0\n",
      "   inequality constraints with lower and upper bounds:        0\n",
      "        inequality constraints with only upper bounds:        0\n",
      "\n",
      "\n",
      "Number of Iterations....: 12\n",
      "\n",
      "                                   (scaled)                 (unscaled)\n",
      "Objective...............:   1.1502075893651909e+00    1.1502075893651909e+00\n",
      "Dual infeasibility......:   1.0234087882698972e-13    1.0234087882698972e-13\n",
      "Constraint violation....:   4.7414571594509346e-13    1.3997691894473974e-12\n",
      "Complementarity.........:   0.0000000000000000e+00    0.0000000000000000e+00\n",
      "Overall NLP error.......:   4.7414571594509346e-13    1.3997691894473974e-12\n",
      "\n",
      "\n",
      "Number of objective function evaluations             = 36\n",
      "Number of objective gradient evaluations             = 13\n",
      "Number of equality constraint evaluations            = 49\n",
      "Number of inequality constraint evaluations          = 0\n",
      "Number of equality constraint Jacobian evaluations   = 13\n",
      "Number of inequality constraint Jacobian evaluations = 0\n",
      "Number of Lagrangian Hessian evaluations             = 12\n",
      "Total CPU secs in IPOPT (w/o function evaluations)   =      0.064\n",
      "Total CPU secs in NLP function evaluations           =      0.011\n",
      "\n",
      "EXIT: Optimal Solution Found.\n",
      "      solver  :   t_proc      (avg)   t_wall      (avg)    n_eval\n",
      "       nlp_f  | 423.00us ( 11.75us) 431.21us ( 11.98us)        36\n",
      "       nlp_g  |   6.12ms (124.82us)   6.12ms (124.86us)        49\n",
      "    nlp_grad  | 264.00us (264.00us) 263.12us (263.12us)         1\n",
      "  nlp_grad_f  | 326.00us ( 23.29us) 327.97us ( 23.43us)        14\n",
      "  nlp_hess_l  | 611.00us ( 50.92us) 610.94us ( 50.91us)        12\n",
      "   nlp_jac_g  |   2.82ms (201.07us)   2.82ms (201.54us)        14\n",
      "       total  |  77.49ms ( 77.49ms)  76.93ms ( 76.93ms)         1\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEGCAYAAABo25JHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAgAElEQVR4nO3deXgV5dn48e99TjZ2A0EQiQQVsYAgS3ErLWJ9taVurdalC9i+xb517eKvb2tbqbW9arXWpdXWaoW2uGsrr3WtEkWrsolsCqKACYpAQCBASM7M/ftj5oRDlpOTZCYnk3N/rivXmZkz88z9nEnOnZln5nlEVTHGGJO7YtkOwBhjTHZZIjDGmBxnicAYY3KcJQJjjMlxlgiMMSbH5WU7gNYqKSnRsrKyNm27e/duevToEWxAnZzVOTdYnXNDe+q8ePHirarav6n3IpcIysrKWLRoUZu2LS8vZ/LkycEG1MlZnXOD1Tk3tKfOIrKhufdCuzQkIn8Rkc0isqKZ90VEbhORtSKyTETGhRWLMcaY5oXZRjALOD3N+58Dhvk/M4A7Q4w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4cWACsBR4GCv3lRf78Wv/9w7MddxvreiywyD/W/wSKu/pxBn4OvA2sAP4GFHa14wzcj9cGUod35vfNthxX4Bt+3dcCF7c2DutiwhhjclyuXBoyxhjTDEsExhiT4ywRGGNMjrNEYIwxOc4SgTHG5DhLBCbniUg/EVnq/2wSkY3+dLWI3JHt+IwJm90+akwKEZkJVKvqTdmOxZiOYmcExjRDRCanjHcwU0Rmi8h8EdkgIl8Ukd+IyHIRedrv6gMRGS8iL4rIYhF5JtlVQJp9fCblbOQNEenVEXUzJpUlAmMydwRe30ZnAn8H5qnqMcBeYKqfDG4HzlXV8cBfgF+2UOYPgEtV9Vhgkl+WMR0qr+VVjDG+p1S1TkSW4w2U8rS/fDlen/LDgVHAc173OMTxug9I5xXgZhGZAzymqpVhBG5MOpYIjMncPgBVdUWkTvc3sLl4f0sCrFTVEzItUFV/LSL/wusj6hUROU1V3w46cGPSsUtDxgRnNdBfRE4Ar4twERnpT18mIpc13EBEjlDV5ap6A14vuUd3aMTGYInAmMCoai1eF8g3iMibeL3Bnui/fTRN949/lXiDsy/D64HyqQ4J1pgUdvuoMR3Av/voi36yMKZTsURgjDE5zi4NGWNMjrNEYIwxOc4SgTHG5DhLBMYYk+MsERhjTI6zRGCMMTnu/wOv9RZNr4D7+AAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "mpo, post = mp.solve(ocp, n_segments=5, poly_orders=50, scheme=\"LGL\", plot=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Terminal time, state : 1000.0000 vs 1000s (Exact), [1.]\n"
     ]
    }
   ],
   "source": [
    "x, u, t, a = post.get_data()\n",
    "print(f\"Terminal time, state : {t[-1][0]:.4f} vs 1000s (Exact), {x[-1]}\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
